GtkFileChoooserNative: change prepend to append for insertions in choices list
authorLuca Bacci <luca.bacci982@gmail.com>
Fri, 12 Jul 2019 08:21:50 +0000 (10:21 +0200)
committerLuca Bacci <luca.bacci982@gmail.com>
Sun, 4 Aug 2019 16:03:21 +0000 (18:03 +0200)
Although slightly less efficient, keeping the order in the choices
list makes it easier for GtkFileChooserNative implementations to
add widgets in the order specified by the application.

See Merge Request !1043

gtk/gtkfilechoosernative.c

index aec8cb9df9ccd7564f45ee48fedd26826b4b5d20..ffd0ae83d0a4b962658c5ddc2c729bb168ef62b3 100644 (file)
@@ -365,7 +365,7 @@ gtk_file_chooser_native_add_choice (GtkFileChooser  *chooser,
   choice->options = g_strdupv ((char **)options);
   choice->option_labels = g_strdupv ((char **)option_labels);
 
-  self->choices = g_slist_prepend (self->choices, choice);
+  self->choices = g_slist_append (self->choices, choice);
 
   gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (self->dialog),
                                id, label, options, option_labels);